//
//  Advertising.m
//  Sydeny
//
//  Created by Rainbow on 7/24/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Advertising.h"


@implementation Advertising

@synthesize adId;
@synthesize image;
@synthesize index;
@synthesize shop;
@synthesize tabbar;

-(id)init
{
    self = [super init];
    if (self) {
        shop = [[Shop alloc] init];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.adId forKey:@"adId"];
	[aCoder encodeObject:self.image forKey:@"image"];
	[aCoder encodeObject:self.index forKey:@"index"];
	[aCoder encodeObject:self.shop forKey:@"shop"];
	[aCoder encodeObject:self.tabbar forKey:@"tabbar"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
		self.adId = [aDecoder decodeObjectForKey:@"adId"];
		self.image = [aDecoder decodeObjectForKey:@"image"];
		self.index = [aDecoder decodeObjectForKey:@"index"];
		self.shop = [aDecoder decodeObjectForKey:@"shop"];
		self.tabbar = [aDecoder decodeObjectForKey:@"tabbar"];
    }
	return self;
}

-(void)dealloc
{
    self.adId = nil;
    self.image = nil;
    self.index = nil;
    self.shop = nil;
    self.tabbar = nil;
    [super dealloc];
}

@end
